/**
 * 系统管理-软件权限创建
 * @author xingzb
 * @date 2020-02-14
 */
import request from '@/utils/request'

export function getResourceTree() {
  return request({
    url: `/arpa-basic-api/resource/tree`,
    method: 'get'
  })
}
export function addResourceTree(query) {
  return request({
    url: `/arpa-basic-api/resource`,
    method: 'post',
    params: query
  })
}
export function updateResourceTree(query) {
  return request({
    url: `/arpa-basic-api/resource`,
    method: 'put',
    params: query
  })
}
export function delResourceTree(query) {
  return request({
    url: `/arpa-basic-api/resource`,
    method: 'delete',
    params: query
  })
}
export function getRoleResourceTree(query) {
  return request({
    url: `/arpa-basic-api/role/resourceCodeList`,
    method: 'get',
    params: query
  })
}
export function updateRoleResourceTree(data) {
  return request({
    url: `/arpa-basic-api/role/updateRoleResource`,
    method: 'put',
    data
  })
}
